﻿using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityEngine;

namespace BF
{
    public class StringBuilderRI : ObjectRecycleItem
    {
        public readonly StringBuilder sb = new StringBuilder();

        public StringBuilderRI()
        {
        }

        public override void OnRecycle()
        {
            sb.Clear();
            base.OnRecycle();
        }

        public override void Dispose()
        {
            sb.Clear();
            base.Dispose();
        }

        public override string ToString()
        {
            return sb.ToString();
        }

        public static StringBuilderRI Pop()
        {
            return ObjectPool.Pop<StringBuilderRI>();
        }
    }
}